package Fly;

import javax.swing.*;
import java.awt.*;

public class MyPanel extends JPanel {
    public void paint(Graphics g){
        //super.paint(g);
        //显示的文字内容等等
        //设置颜色
        g.setColor(Color.pink);
        //设置字体
        Font font =new Font("Times New Roman",Font.BOLD,26);
        g.setFont(font);
        g.drawString("score:",20,50);
        g.drawString("life:",20,90);

    }
}
